package com.zxy.springboot_vue.common;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Auther: lenovo
 * @Date: 2021/10/28 13:22
 * @Description:
 */
@Component
public class SendMsgUtil {
    //发件人
    /*private String from="3147448631@qq.com";

    @Autowired
    private JavaMailSender sender;

    public void sendTextEmail(String to,String subject,String content){
        SimpleMailMessage message = new SimpleMailMessage();
        message.setFrom(from);
        message.setTo(to);
        message.setSubject(subject);
        message.setText(content);
        message.setSentDate(new Date());
        sender.send(message);
    }*/
}
